<!DOCTYPE html>
<html>
<head>
	<title></title>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<link rel="stylesheet" type="text/css" href="/static/css/hw-admin.css">
	<link rel="stylesheet" href="/static/css/lb.css"> 

	<style>
	.main-table-wrap{
		padding: 0 20px;
	}	
	</style>
   	<!--[if lt IE 9]>
    　 <script src="https://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
       <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.js"></script>
    <![endif]-->
</head>
<body>

	<div class="hw-iframe">
		<!-- 顶部标题 -->
        <div class="hw-header-wrapper">
            <div class="hw-header">
                <div class="hw-header__item--left">
                    会员列表
                </div>
                <div class="hw-header__item--right">
                    <div class="hw-btn-group">
                    	<a href="<?=base_url().'Admin/Member/memberDown'.'?'.$get ?>">
	                        <button class="hw-btn--normal">导出</button>
                    	</a>
                    </div>
                </div>
            </div>
        </div>

        <!-- 顶部筛选 -->
        <div class="hw-filter-wrapper">
			<div class="hw-filter">
				<form method="GET" action="<?=$url ?>">
					<div class="default-filter"> 
						<div class="hw-input-label"> 
							<div class="form-control">
								<div class="hw-search-prevent">
									<input type="text" id="company-name" class="hw-input" placeholder="请输入完整的身份证、姓名、账号" name="screen" value="<?=isset($_GET['screen']) ? $_GET['screen'] : '' ?>">
									<button class="search-btn" type="submit"><i class="iconfont"></i></button>
								</div>
							</div>
						</div>
						<input type="hidden" id="state" name="state" value="">
						<div class="filter-switch" data-status="">更多筛选条件<i style="transform: scale(0.56);" class="iconfont hw-down">&#xe87d;</i><i  style="transform: scale(0.56);" class="iconfont hw-up hide">&#xe87e;</i></div>
					</div>
					<div class="filter-detail" style="display: <?=isset($_GET['start_time']) ? 'block' : 'none' ?>">
						<div class="filter-item">
							<div class="hw-input-label">
								<label class="name" for="">创建时间</label>
								<div class="input-icon-group">
									<input type="text" id="startime" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'endtime\',{d: -1})||\'%y-%M-{%d-1}\'}'})" placeholder="选择日期" name="start_time" value="<?=isset($_GET['start_time']) ? $_GET['start_time'] : '' ?>"  autocomplete="off" disableautocomplete>
									<div class="icon-wrapper">
										<i class="iconfont">&#xe601;</i>
									</div>
								</div>
							</div>
							<div class="hw-input-label">
								<label class="name" for="" style="width: 34px;text-align: center;">——</label>
								<div class="input-icon-group">
									<input type="text" id="endtime" onclick="WdatePicker({minDate:'#F{$dp.$D(\'startime\',{d:1});}',maxDate: '%y-%M-%d'})" placeholder="选择日期" name="end_time" value="<?=isset($_GET['end_time']) ? $_GET['end_time'] : '' ?>"  autocomplete="off" disableautocomplete>
									<div class="icon-wrapper">
										<i class="iconfont">&#xe601;</i>
									</div>
								</div>
							</div>
							<div class="operate-btns">
								<div style="float: left;" class="hw-btn hw-default-btn reset_form"><i style="font-size: 13px;position: relative;left: -2px;" class="iconfont">&#xe629;</i>重置</div>
								<button class="hw-btn"><i class="iconfont">&#xe9df;</i>查询</button>
							</div>
						</div>
					</div>
				</form>
			</div>
		</div>
		
		<!-- 表格 -->
		<div class="main-table-wrap">
            <form id="table-form" method="POST" action="">
				<table cellspacing="0" cellpadding="0" border="0">  
					<colgroup>
						<!-- <col class="col-3">
						<col class="col-2">
						<col class="col-15">
						<col class="col-7">
						<col class="col-7">
						<col class="col-4">
						<col class="col-5"> 
						<col class="col-10"> -->
					</colgroup>

					<thead>
						<tr>
							<th>序号</th>
							<th>身份证</th>
							<th>姓名</th>
							<th>性别</th>
							<th>手机号</th>
							<th>昵称</th>
							<th class="hover-th">
								<span>
									<?php if (isset($_GET['state'])): ?>
	                                    <?php switch ($_GET['state']) {
	                                        case '1':
	                                            echo '已授权';
	                                            break;

	                                        case '2':
	                                            echo '未认证';
	                                            break;

	                                        case '3':
	                                            echo '已认证';
	                                            break;
	                                        
	                                        default:
	                                            echo '账号状态';
	                                            break;
	                                    } ?>
	                                <?php else: ?>
	                                    账号状态
	                                <?php endif ?>
									<i class="iconfont"></i>
								</span>
								<div class="hover-content"> 
									<ul class="info" data-target="#state"> 
										<li class="list <?=isset($_GET['state']) ? ($_GET['state'] == '' ? 'active' : '') : 'active' ?>" data-value="">全部</li>
										<li class="list <?=isset($_GET['state']) && $_GET['state'] === '3' ? 'active' : '' ?>" data-value="3">已认证</li>
										<li class="list <?=isset($_GET['state']) && $_GET['state'] === '2' ? 'active' : '' ?>" data-value="2">未认证</li>
										<li class="list <?=isset($_GET['state']) && $_GET['state'] === '1' ? 'active' : '' ?>" data-value="1">已授权</li>
									</ul>
								</div>
							</th>
							<th>创建时间</th>
							<th>操作</th>
						</tr>
					</thead>
					

					<tbody>
						<?php foreach ($list as $key => $value): ?>
							<tr>
								<td><?=$key+1 ?></td>
								<td><?=!empty($value['idNumber']) ? substr_replace($this->unlock($value['idNumber']), '******', 6, 8) : '' ?></td>
								<td><?=$value['name'] ?></td>
								<td><?=$value['gender'] == 'male' ? '男' : ($value['gender'] == 'famale' ? '女' : '未知') ?></td>
								<td><?=$this->unlock($value['phone']) ?></td>
								<td><?=$value['nickname'] ?></td>
								<td><?=$value['state'] == 3 ? '已认证' : ($value['state'] == 2 ? '未认证' : '已授权') ?></td>
								<td><?=$value['create_time'] ?></td>
								<td class="opt">
									<a class="blue-color" href="<?=base_url().'Admin/Member/memberDetail?member_id='.$value['id'] ?>"><i class="iconfont" style="margin-right: 3px;">&#xe6f4;</i>查看</a>
								</td>
							</tr>
						<?php endforeach ?>
					</tbody>
				</table>
			</form>
            <?php $this->load->view('Admin/Page/page'); ?>
		</div>
	</div>

	<script src="/static/lib/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="/static/lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="/static/lib/jquery.form.min.js"></script>
    <script type="text/javascript" src="/static/js/common/util.js"></script>
	<script type="text/javascript" src="/static/js/common/upload.js"></script>
	<script type="text/javascript" src="/static/lib/jquery.validate.js"></script>
	<script type="text/javascript" src="/static/lib/messages_zh.js"></script>
	<script type="text/javascript" src="/static/js/common/validateExtend.js"></script>
	<script type="text/javascript" src="/static/js/common/common.js"></script>
    <!-- <script type="text/javascript" src="/static/lib/ueditor/ueditor.config.js"></script>
	<script type="text/javascript" src="/static/lib/ueditor/ueditor.all.min.js"></script>
	<script type="text/javascript" src="/static/lib/ueditor/addCustomizeDialog.js"></script> -->

</body>
</html>